package framework.apache.common.codec.Metaphone_and_Soundex;
import org.apache.commons.codec.language.Metaphone;
import org.apache.commons.codec.language.RefinedSoundex;
import org.apache.commons.codec.language.Soundex;
public class LanguageTest {
	public static void main(String args[]) {
		Metaphone metaphone = new Metaphone();
		RefinedSoundex refinedSoundex = new RefinedSoundex();
		Soundex soundex = new Soundex();
		for (int i = 0; i < 2; i++) {
			String str = (i == 0) ? "resume" : "resin";
			String mString = null;
			String rString = null;
			String sString = null;
			try {
				mString = metaphone.encode(str);
				rString = refinedSoundex.encode(str);
				sString = soundex.encode(str);
			} catch (Exception ex) {
				;
			}
			System.out.println("Original:" + str);
			System.out.println("Metaphone:" + mString);
			System.out.println("RefinedSoundex:" + rString);
			System.out.println("Soundex:" + sString + "\\n");
		}
	}
}
